<template>
  <div>
    <div style="height: 1000px ;width: 10% ;border: #000c17 solid 1px">
     合并对象: {{data1}}
    </div>
  </div>

</template>

<script>
  export default {
    name: 'test',
    data() {
      return {
        data1: ''
      }
    }, methods: {
      test: function() {
        const test1 = { a: 123, b: 456 }
        const test2 = { a: 456, c: 789, d: 123123 }
        this.data1 = Object.assign(test1, test2)
        console.log(this.data1)
      }
    }, created() {
      this.test()
    }, mounted() {

    }
  }
</script>

<style scoped>

</style>